Call gtk_drag_update for non-motion events. (#325443, Peter Harvey)
authorMatthias Clasen <mclasen@redhat.com>
Tue, 3 Jan 2006 13:50:02 +0000 (13:50 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 3 Jan 2006 13:50:02 +0000 (13:50 +0000)
2006-01-03  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkdnd.c (gtk_drag_begin_internal): Call gtk_drag_update
for non-motion events.  (#325443, Peter Harvey)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkdnd.c

index 5565034098b96fafcf735f9c30cc4abee4858642..ba4342ebccf28eee136b3bdbfff056f857c029e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-01-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkdnd.c (gtk_drag_begin_internal): Call gtk_drag_update
+       for non-motion events.  (#325443, Peter Harvey)
+
        * gtk/gtkaction.c: Avoid connecting to notify on our own
        properties. 
 
index 5565034098b96fafcf735f9c30cc4abee4858642..ba4342ebccf28eee136b3bdbfff056f857c029e9 100644 (file)
@@ -1,5 +1,8 @@
 2006-01-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkdnd.c (gtk_drag_begin_internal): Call gtk_drag_update
+       for non-motion events.  (#325443, Peter Harvey)
+
        * gtk/gtkaction.c: Avoid connecting to notify on our own
        properties. 
 
index 9caa1a711abc1fb22c9eb31a28f27d2a8aea8a71..e29e270e9426f7546bae9be5a41d89778835335a 100644 (file)
@@ -2220,6 +2220,8 @@ gtk_drag_begin_internal (GtkWidget         *widget,
     
   if (event && event->type == GDK_MOTION_NOTIFY)
     gtk_drag_motion_cb (info->ipc_widget, (GdkEventMotion *)event, info);
+  else
+    gtk_drag_update (info, info->screen, info->cur_x, info->cur_y, (GdkEvent *)event);
 
   info->start_x = info->cur_x;
   info->start_y = info->cur_y;
@@ -3746,8 +3748,12 @@ gtk_drag_update (GtkDragSourceInfo *info,
   info->cur_x = x_root;
   info->cur_y = y_root;
   if (info->last_event)
-    gdk_event_free ((GdkEvent *)info->last_event);
-  info->last_event = gdk_event_copy ((GdkEvent *)event);
+    {
+      gdk_event_free ((GdkEvent *)info->last_event);
+      info->last_event = NULL;
+    }
+  if (event)
+    info->last_event = gdk_event_copy ((GdkEvent *)event);
 
   gtk_drag_add_update_idle (info);
 }